package com.zyd.mappers;

import com.zyd.io.model.RolePowerEntity;
import com.zyd.io.model.RolePowerEntityExample;
import com.zyd.io.model.RolePowerEntityKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface RolePowerEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @SelectProvider(type=RolePowerEntitySqlProvider.class, method="countByExample")
    long countByExample(RolePowerEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @DeleteProvider(type=RolePowerEntitySqlProvider.class, method="deleteByExample")
    int deleteByExample(RolePowerEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Delete({
        "delete from zydzn_power",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(RolePowerEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Insert({
        "insert into zydzn_power (id, roleid, ",
        "menuid, area, dr, ",
        "ts)",
        "values (#{id,jdbcType=VARCHAR}, #{roleid,jdbcType=VARCHAR}, ",
        "#{menuid,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{dr,jdbcType=INTEGER}, ",
        "#{ts,jdbcType=VARCHAR})"
    })
    int insert(RolePowerEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @InsertProvider(type=RolePowerEntitySqlProvider.class, method="insertSelective")
    int insertSelective(RolePowerEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @SelectProvider(type=RolePowerEntitySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="roleid", property="roleid", jdbcType=JdbcType.VARCHAR),
        @Result(column="menuid", property="menuid", jdbcType=JdbcType.VARCHAR),
        @Result(column="area", property="area", jdbcType=JdbcType.VARCHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="ts", property="ts", jdbcType=JdbcType.VARCHAR)
    })
    List<RolePowerEntity> selectByExample(RolePowerEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Select({
        "select",
        "id, roleid, menuid, area, dr, ts",
        "from zydzn_power",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="roleid", property="roleid", jdbcType=JdbcType.VARCHAR),
        @Result(column="menuid", property="menuid", jdbcType=JdbcType.VARCHAR),
        @Result(column="area", property="area", jdbcType=JdbcType.VARCHAR),
        @Result(column="dr", property="dr", jdbcType=JdbcType.INTEGER),
        @Result(column="ts", property="ts", jdbcType=JdbcType.VARCHAR)
    })
    RolePowerEntity selectByPrimaryKey(RolePowerEntityKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @UpdateProvider(type=RolePowerEntitySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") RolePowerEntity record, @Param("example") RolePowerEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @UpdateProvider(type=RolePowerEntitySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") RolePowerEntity record, @Param("example") RolePowerEntityExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @UpdateProvider(type=RolePowerEntitySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(RolePowerEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table zydzn_power
     *
     * @mbg.generated Sat Oct 27 08:26:17 CST 2018
     */
    @Update({
        "update zydzn_power",
        "set roleid = #{roleid,jdbcType=VARCHAR},",
          "menuid = #{menuid,jdbcType=VARCHAR},",
          "area = #{area,jdbcType=VARCHAR},",
          "dr = #{dr,jdbcType=INTEGER},",
          "ts = #{ts,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(RolePowerEntity record);
}